Skip to content

Fix handling of duplicate competition IDs in SoaringSpot#63

Merged
sylvainvdm merged 1 commit intodevelopmentfrom
fix-duplicate-competition-ids
Oct 26, 2025
Merged

Fix handling of duplicate competition IDs in SoaringSpot#63
sylvainvdm merged 1 commit intodevelopmentfrom
fix-duplicate-competition-ids

Conversation

@sylvainvdm
Copy link
Collaborator

Some SoaringSpot competitions have multiple pilots with identical competition IDs. Previously, this caused IGC files to be overwritten during download, resulting in data loss for all but the last pilot with that ID.

This commit resolves the issue by:

  • Tracking competition IDs as they are processed
  • Appending suffixes (_2, _3, etc.) to duplicates
  • Logging warnings when duplicates are detected
  • Ensuring each pilot gets a unique filename for their IGC file

Added comprehensive unit test that verifies:

  • All competitors are retained (no data loss)
  • Duplicate IDs are resolved with unique suffixes
  • Pilot information and rankings are preserved
  • Both pilots with duplicate IDs can be processed

Tested with: https://www.soaringspot.com/nl/keiheuvelcup2025/results/open-xpdr/task-1-on-2025-08-23/daily where two pilots share competition ID "FS"

Some SoaringSpot competitions have multiple pilots with identical
competition IDs. Previously, this caused IGC files to be overwritten
during download, resulting in data loss for all but the last pilot
with that ID.

This commit resolves the issue by:
- Tracking competition IDs as they are processed
- Appending suffixes (_2, _3, etc.) to duplicates
- Logging warnings when duplicates are detected
- Ensuring each pilot gets a unique filename for their IGC file

Added comprehensive unit test that verifies:
- All competitors are retained (no data loss)
- Duplicate IDs are resolved with unique suffixes
- Pilot information and rankings are preserved
- Both pilots with duplicate IDs can be processed

Tested with: https://www.soaringspot.com/nl/keiheuvelcup2025/results/open-xpdr/task-1-on-2025-08-23/daily
where two pilots share competition ID "FS"
@sylvainvdm sylvainvdm merged commit b63922d into development Oct 26, 2025
1 check passed
@sylvainvdm sylvainvdm deleted the fix-duplicate-competition-ids branch October 26, 2025 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant